// 引入Vue
import Vue from 'vue';
// 引入
import VueRouter from 'vue-router';

Vue.use(VueRouter);
import Home from '@/pages/Home';
import Login from '@/pages/Login';
import Register from '@/pages/Register';
import Search from '@/pages/Search';

export default new VueRouter({
     routes: [
         {
            path:'/home',
            component: Home,
            meta:{show: true}
         },
         {
             path:'/login',
             component: Login,
            meta:{show: false}
         },
         {
             path:'/register',
             component: Register,
            meta:{show: false}
         },
         {
             path:'/search/:keyword?',
             component: Search,
             name:'search',
            meta:{show: true}
         },
         {
             path:'/',
             redirect:'/home'
         }
     ]


});